use ggez::mint::Vector2;

pub struct Walker {
    location: Vector2<f32>,
    speed: Vector2<f32>,
}

impl Walker {
    pub fn new() -> Walker{
        Walker{location : Vector2 { x: 100.0, y: 100.0 }, speed: Vector2 {x: 1.0, y: 3.3}}
    }
    pub fn get_location(& self) -> Vector2<f32> {
        self.location
    }
    pub fn step(&mut self) {
        self.location.x += self.speed.x;
        self.location.y += self.speed.y;
        if (self.location.x>800.0) || (self.location.x<0.0) {
            self.speed.x *= -1.0
        }
        if (self.location.y>600.0) || (self.location.y<0.0) {
            self.speed.y *= -1.0
        }
    }
}
